<template>
  <div>
    <Header></Header>
    <!--  应该放置路由组件 首页 搜索页 登录 注册 购物车...  -->
    <router-view></router-view>
    <Footer v-show="!$route.meta.noHidden"></Footer>
  </div>
</template>

<script>
import Header from "@/components/Header";
import Footer from "@/components/Footer";
export default {
  name: "App",
  mounted(){
      this.getCategoryList();
  },
  methods:{
     getCategoryList() {
      //自己先添加一个方法  别的地方可能还要用这个方法
      this.$store.dispatch("getCategoryList");
    },
  },
  components: {
    Header,
    Footer,
  },
  computed: {
    // aaa(){
    //   return this.$route.path !== '/login' && this.$route.path != '/register'
    // }
  },
};
</script>

<style lang="less" scoped>
</style>
